#include <stdio.h>
#include <time.h>

void wait(int seconds)
{
	clock_t endwait;
	endwait = clock() + seconds * CLOCKS_PER_SEC;
	while(clock() < endwait) { }
}

int main()
{
	do
	{
		int sec;
		printf("enter the number of seconds to wait: ");
		scanf("%d", &sec);
		
		printf("wainting for %d seconds...\n", sec);
		wait(sec);
		printf("finish waiting\n");
	}
	while(1);
}
